<!--
 * @Author: zjf
 * @Date: 2023-11-30 00:36:28
 * @LastEditors: zjf
 * @LastEditTime: 2023-12-07 10:05:34
 * @Description:
-->
<template>
  <l-fullscreen-dialog class="details-dialog" :title="$t(formTitle)" :visible.sync="detailsVisible" :showOk="false"
    :hasBtns="false">
    <DetailsForm v-if="detailsVisible" ref="DetailsForm" :hasEdit="hasEdit">
    </DetailsForm>
  </l-fullscreen-dialog>
</template>

<script>
import DetailsForm from "./details.vue";//项目详情
export default {
  name: 'l-project-details',
  components: { DetailsForm },
  props: {
  },
  data() {
    return {
      detailsVisible: false,
      formEditRow: {},
      formTitle: "",
      hasEdit: false,
    };
  },
  computed: {
  },
  created() { },
  mounted() {
    this.init()
  },
  methods: {
    init() {
      this.lr_loadDataItem('constructionNature') // 建设性质
      this.lr_loadDataItem('projectLevel') // 项目等级
      this.lr_loadDataItem('trueOrFalse') // 是否
      this.lr_loadDataItem('worksCategory') // 工程类别
      this.lr_loadDataItem('subordinatePlate') // 所属区域
      this.lr_loadDataItem('contractType') // 合同类别
      this.lr_loadDataSourceData('businessStage', false) // 项目阶段业务
      this.lr_loadDataItem('overallProjectPhase') // 项目总体阶段
      this.lr_loadDataItem('constructionStage') // 施工阶段


    },

    open(data, isEdit = false) {
      this.formEditRow = data
      this.formTitle = data.projectName || '详情'
      this.hasEdit = isEdit
      this.detailsVisible = true
      this.$nextTick(() => {
        this.$refs.DetailsForm.init(this.formEditRow)
      })
    },

  }
};
</script>
<style lang="scss" scoped>
.details-dialog {
  // text-align: center;
}
</style>